<?php

/*
=====================================================
 FluxBB - Delux Board Converstations (DBC)
-----------------------------------------------------
 http://dbc-forum.com/
 http://fluxbb.org/
-----------------------------------------------------
 Copyright (c) 2010,2011 FluxBB - Delux Board Conversations (DBC)
-----------------------------------------------------
 Предсловие: Данный скрипт (DBC) не является работой с нуля, то 
 есть ядром скрипта всё также остаётся FuxBB,но теперь в оболочке
 DBC.
=====================================================
*/

define('DBC_ROOT', './');
define('DBC_QUIET_VISIT', 1);
require DBC_ROOT.'engine/common.php';
$page_title = array(DBC_htmlspecialchars($DBC_config['o_board_title']), $lang_common['Contacts']);
define('DBC_ALLOW_INDEX', 1);
require DBC_ROOT.'engine/engine.php';
$show = '5'; // Change 5 by the number of topics you want the mod to display
require DBC_ROOT.'engine/last_topics.php';
require DBC_ROOT.'engine/parser.php';
//echo "<PRE>"; print_r ($DBC_config); echo "</PRE>";

if ($_POST[form_sent] == 1) {
//Process The Form
?>

<?php
	$recipient = "$toName <".$toMail.">";
	$headers ="From: ".$_POST[name]." <".$_POST[email].">";
	$subject = "WEBFORM:".$_POST[subject];
	$message = str_replace("\\", "", $_POST[comments]);
	mail($DBC_config['o_admin_email'], $subject, $message, $headers);
?>


<div class="blockform">




<table border="0" cellpadding="0" cellspacing="0" height="38" width="100%"><thead><tr>
<td class="bg_forum_title_left" align="left" width="28"><img src="engine/skins/images/spacer.gif" border="0"></td>
<td class="bg_forum_title_center" align="left"><span class="cat_title"><?php echo $lang_common['Contacts'] ?></span></td>
<td class="bg_forum_title_right" align="center" width="28"><img src="engine/skins/images/spacer.gif" border="0"></td>
</tr></thead></table>

<table class="forum_adv_table" border="0" cellpadding="0" cellspacing="0" width="100%"><thead><tr>
<td class="forum_adv_tleft" align="left" width="2"><img src="engine/skins/images/spacer.gif" border="0"></td>
<td align="left" width="100%"><div class="forum_adv_c">




		<form id="contact" method="post" action="contact.php">
			<div class="inform">
				<fieldset>
					<legend><?php echo $lang_common['Contacts_sent'] ?></legend>
					<div class="infldset">
						<label><b><?php echo $lang_common['Contacts_name'] ?></b>: <?php echo $_POST[name]; ?><br /></label>
						<label><b><?php echo $lang_common['Contacts_email'] ?></b>: <?php echo $_POST[email]; ?><br /></label>
						<label><b><?php echo $lang_common['Contacts_subject'] ?></b>: <?php echo $_POST[subject]; ?><br /></label>
						<label><b><?php echo $lang_common['Contacts_comment'] ?></b>: <?php echo $_POST[comments]; ?><br /></label>
					</div>
				</fieldset>
			</div>
		</form>





</div></td>
<td class="forum_adv_tright" align="left" width="2"><img src="engine/skins/images/spacer.gif" border="0"></td>
</tr></thead></table>
<table border="0" cellpadding="0" cellspacing="0" height="23" width="100%"><thead><tr>
<td class="bg_forum_bott_left" align="left" width="30"><img src="engine/skins/images/spacer.gif" border="0"></td>
<td class="bg_forum_bott_center" align="left"><img src="engine/skins/images/spacer.gif" border="0"></td>
<td class="bg_forum_bott_right" align="center" width="30"><img src="engine/skins/images/spacer.gif" border="0"></td>
</tr></thead></table>





</div>

<?php } else { 
//Display the Form
?>

<div class="blockform">





<table border="0" cellpadding="0" cellspacing="0" height="38" width="100%"><thead><tr>
<td class="bg_forum_title_left" align="left" width="28"><img src="engine/skins/images/spacer.gif" border="0"></td>
<td class="bg_forum_title_center" align="left"><span class="cat_title"><?php echo $lang_common['Contacts'] ?></span></td>
<td class="bg_forum_title_right" align="center" width="28"><img src="engine/skins/images/spacer.gif" border="0"></td>
</tr></thead></table>

<table class="forum_adv_table" border="0" cellpadding="0" cellspacing="0" width="100%"><thead><tr>
<td class="forum_adv_tleft" align="left" width="2"><img src="engine/skins/images/spacer.gif" border="0"></td>
<td align="left" width="100%"><div class="forum_adv_c">





		<form id="contact" method="post" action="contact.php">
			<div class="inform">
				<fieldset>
					<legend><?php echo $lang_common['Contacts_detals'] ?></legend>
					<div class="infldset">
						<input type="hidden" name="form_sent" value="1" /><br />
						<label><?php echo $lang_common['Contacts_name'] ?><br /><input type="text" class="input_text" name="name" value="" size="40" maxlength="40" /><br /></label>
						<label><?php echo $lang_common['Contacts_email'] ?><br /><input type="text" class="input_text" name="email" value="" size="40" maxlength="50" /><br /></label>
						<label><?php echo $lang_common['Contacts_subject'] ?><br /><input type="text" class="input_text" name="subject" value="" size="40" maxlength="50" /><br /></label>
						<label><?php echo $lang_common['Contacts_comment'] ?><br /><textarea name="comments" class="input_text" rows="5" cols="40"></textarea><br /></label>
					</div>
				</fieldset><br/>
			<p><input type="submit" class="fbutton" name="update" value="<?php echo $lang_common['Submit'] ?>" /></p>

			</div>
		</form>





</div></td>
<td class="forum_adv_tright" align="left" width="2"><img src="engine/skins/images/spacer.gif" border="0"></td>
</tr></thead></table>
<table border="0" cellpadding="0" cellspacing="0" height="23" width="100%"><thead><tr>
<td class="bg_forum_bott_left" align="left" width="30"><img src="engine/skins/images/spacer.gif" border="0"></td>
<td class="bg_forum_bott_center" align="left"><img src="engine/skins/images/spacer.gif" border="0"></td>
<td class="bg_forum_bott_right" align="center" width="30"><img src="engine/skins/images/spacer.gif" border="0"></td>
</tr></thead></table>


</div>



<?php

}	//close if statement
 
$footer_style = 'index';
require DBC_ROOT.'engine/footer.php';